package com.weight.aspect;
 
import lombok.extern.slf4j.Slf4j; 
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import com.weight.common.exception.LoginerException;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author 【swg】.
 * @Date 2017/12/11 21:27
 * @DESC
 * @CONTACT 317758022@qq.com
 */
//@Aspect
//@Component
//@Slf4j
public class WightrAuthorizeAspect {
//
//    @Pointcut("execution(public * com.weight.*.*.web.*.*(..))" +
//            "&& !execution(public * com.weight.common.user.web.LoginInfoController.login(..))")
//    public void verify(){}
//
//    @Before("verify()")
//    public void doVerify(){
//        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
//        HttpServletRequest request = attributes.getRequest();
//
//        if(request.getSession().getAttribute("loginUser") == null){
//            log.warn("【登陆校验】,用户未登陆");
//            throw new LoginerException();
//        }
//    }
}
